 <script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//cnova.github.io/jquery-lock/release/jquery.lock.min.js"></script>
<script>
$( document ).ready(function() {
   

$('#lock').click(function(){
		$("h1,p").lock({
    customHandler: function(element, updatedHtml, savedHtml) {
        //Block the change  
        $(element).html(savedHtml);
        //Do something else with the updatedHtml
        console.log('Change blocked %s', updatedHtml);
    }
});
	})
	$('#unlock').click(function(){
		$('h1,p').unlock();
	})



});
</script>
<h1> I am locked =) </h1>
<p> I am locked too! </p>


<button id="lock" type="button">锁定</button>
<button type="button" id="unlock">解锁</button